﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ajayumi.develop.win32.Transport.WCF.Services.DataContracts;
using System.ComponentModel;

namespace ajayumi.develop.win32.Transport.WCF.Services
{
    /// <summary>
    /// 扩展传输文件项
    /// Author  : 黄乙冬
    /// Date    : 2011-08-29
    /// </summary>
    public class TransFileItem : TransFileBaseInfo, INotifyPropertyChanged
    {
        private string fileSize = string.Empty;
        public string FileSize
        {
            get { return this.fileSize; }
            set
            {
                this.fileSize = value;
                this.OnPropertyChanged("FileName");
            }
        }

        private string progressPercentage = "0%";
        public string ProgressPercentage
        {
            get { return this.progressPercentage; }
            set
            {
                this.progressPercentage = value;
                this.OnPropertyChanged("ProgressPercentage");
            }
        }

        private string startTime = string.Empty;
        public string StartTime
        {
            get { return this.startTime; }
            set
            {
                this.startTime = value;
                this.OnPropertyChanged("StartTime");
            }
        }

        private string endTime = string.Empty;
        public string EndTime
        {
            get { return this.endTime; }
            set
            {
                this.endTime = value;
                this.OnPropertyChanged("EndTime");
            }
        }

        public ajayumi.develop.win32.Transport.WCF.Services.TransStatus Status { get; set; }

        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
